#打印菱形
for i in range(1,10):
    print(" "*(10-i)+"*"*(i+i-1))
for j in range(10,1,-1):
    print(" "*(10-j)+"*"*(j+j-1))
#打印九九乘法表
for i in range(1,10):
    for j in range(1,i+1):
        print("%d*%d=%d"%(j,i,i*j),end="\t")
    print()
print("--------")
#打印水仙花数
for i in range(100,1000):
    ge=i%10
    shi=i//10%10
    bai=i//100
    if i==ge**3+shi**3+bai**3:
        print(i)
print("--------")
#打印斐波那契数列
def fib(n):
    if n<=2:
        return 1
    return fib(n-1)+fib(n-2)
for i in range(1,10):
    print(fib(i))
print("--------")
#打印100以内的质数
def isprime(n):
    for i in range(2,n):
        if n%i==0:
            return False
        return True
for i in range(1,100):
    if isprime(i):
        print(i)
print("--------")
#打印100以内的完数
for i in range(1,101):
    sum=0
    for j in range(1,i):
        if i%j==0:
            sum+=j
    if sum==i:
     print(i,end="\t")